package com.ruoyi.web.controller.tzzl;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.tzzl.domain.WzMembersLevel;
import com.ruoyi.tzzl.service.IWzMembersLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * 会员等级管理Controller
 * @author by caoyong
 * @date 2022/11/7
 **/
@RestController
@RequestMapping("/tzzl/level")
public class WzMembersLevelController extends BaseController {

    @Autowired
    IWzMembersLevelService wzMembersLevelService;

    /**添加等级*/
   @PostMapping("addLevel")
    public AjaxResult addLevel(@RequestBody WzMembersLevel wzMembersLevel){
       wzMembersLevel.setCreateTime(new Date());
       return AjaxResult.success(wzMembersLevelService.save(wzMembersLevel));
   }


}
